import axios from './myAxios'

// 管理员登陆
export const reqLogin = (user) => axios.post('/users/login', user)

// 获取标签表格数据
export const reqTags = (current, size = 7) => axios(`/tags/${current}/${size}`)

// 更新标签数据
export const reqUpdateTag = (tag) => axios.put('/tags', tag)

// 添加标签数据
export const reqAddTag = (tag) => axios.post('/tags', tag)

// 删除标签数据
export const reqDeleteTag = (id) => axios.delete(`/tags/${id}`)

// 获取分类表格数据
export const reqClasses = (current, size = 7) => axios(`/classes/${current}/${size}`)

// 更新分类数据
export const reqUpdateClasses = (classes) => axios.put('/classes', classes)

// 添加分类数据
export const reqAddClasses = (classes) => axios.post('/classes', classes)

// 删除分类数据
export const reqDeleteClasses = (id) => axios.delete(`/classes/${id}`)

// 分页请求博客数据
export const reqBlogs = (current, size = 7) => axios(`/blogs/${current}/${size}`)